/* @flow */

import * as nodeOps from 'web/runtime/node-ops' // dom操作api
import { createPatchFunction } from 'core/vdom/patch'
import baseModules from 'core/vdom/modules/index'
import platformModules from 'web/runtime/modules/index'

// the directive module should be applied last, after all
// built-in modules have been applied.
// platformModule 和平台相关的模块，包括属性，样式，事件，以及snabbdom没有的 transition 动画
// baseModules 指令和ref模块
const modules = platformModules.concat(baseModules)

// nodeOps 对dom进行操作的集合
export const patch: Function = createPatchFunction({ nodeOps, modules })
